using System;
using System.Collections.Generic;
using System.Diagnostics;
using FishFillets.Model;
using FishFillets.Model.GameItems;
using Microsoft.Xna.Framework;

namespace FishFillets.ObjectLogic
{
    /// <summary>
    /// This class executes methods from prescripted level classes.
    /// </summary>
    public class LevelAgent : ILevelAgent
    {
        public Fish Big
        {
            get { return GameController.Instance.Level.Big; }
        }

        public Fish Small
        {
            get { return GameController.Instance.Level.Small; }
        }

        public Dictionary<string, Item> Items
        {
            get { return GameController.Instance.Level.ItemsDict;  }
        }

        public void PlayMusic(string song)
        {
            Debug.Assert(song != null);

            GameController.Instance.MusicTrack = song;
        }

        public bool no_dialog()
        {
            return GameController.Instance.dialogManager.Dialogs.Count == 0 &&
                GameController.Instance.dialogManager.CurrentDialog == null;
        }

        public void planDialog(long delay, string messageID, Color color)
        {
            GameController.Instance.dialogManager.AddItem(delay, messageID, color);
        }

        public void adddel(int delay)
        {
            GameController.Instance.dialogManager.AddDelay(delay);
        }

        public int getRestartCount()
        {
            return GameController.Instance.Level.RestartCount;
        }
    }
}
